Email

You can configure your bot to communicate with users via Microsoft email through the Bot Framework. By configuring your bot to access an email account, it receives a message when a new email arrives. This enables the bot to use email as a channel for responding to user inquiries, such as sending an email reply to a user message.

HINT: The Email channel integrates with Microsoft through the Bot Framework. If you prefer a direct integration with Microsoft using the Graph API, use the Outlook channel instead.
NOTE:
  • The Email channel works with Office 365 only. Other email services are not currently supported.
  • This channel is available in DRUID version 7.0 and higher and only in cloud and hybrid DRUID deployments. You cannot activate the channel in DRUID on-premise deployments.
  • The Email channel only supports message steps. Rich content flow steps (such as hero cards or choice steps) are not supported.

Prerequisites

Before configuring the Email channel, ensure you have:

  • A published a Druid bot.
  • A dedicated M365 email account for the bot. This account must use Modern authentication (OAuth). Contact your company's email administrator to obtain this dedicated M365 email account.
  • The bot M365 email account must be logged into any Microsoft 365 product in your browser before you start configuration.

Configuring the Email channel

To configure the Email channel, follow these steps:

  1. Log in to the Druid Portal and select your bot.
  2. Click the Channels tab.
  3. Search for 'email' and click the Email card.
  4. The channel configuration modal appears.

  5. In the Email address field, enter the dedicated Office 365 email account for the bot and click Authorize.
  6. IMPORTANT! Do not enter your own personal email account, as every message sent to that email account will be forwarded to the bot. This can result in the bot inappropriately sending a response to a sender. For this reason, bots should only use dedicated M365 email accounts.
  7. The 'Sign in to your account' pop-up opens.
  8. NOTE: If the pop-up does not open, check that your browser is not blocking pop-ups. Always allow pop-ups and redirects from the Druid AI Platform.
  9. Sign in with the dedicated M365 email account.
  10. After successful sign-in, a page opens displaying a validation code. Copy this code.
  11. Return to the Druid Portal. In the Code field, paste the validation code to finish authorizing the bot email address.
  12. Click the Publish button. The channel activation might take up to 1 minute.

After the channel activates, the following fields are available in Druid:

  • [[ChatUser]].ChannelId = "email"
  • [[ChatUser]].UserId - Stores the email address of the sender.

Inactivating the channel

To inactivate the channel, follow these steps:

  1. Go to the Channels page, and click on the Email card.
  2. Click Authorize and sign in with the dedicated Office 365 email account .
  3. After successful sign-in, a page opens displaying a validation code. Copy this code.
  4. Return to the Druid Portal. In the Code field, paste the validation code.
  5. Click Disable to inactivate the channel.